package com.o2o.app.userCenter;

/**
 * 个人中心
 */
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.RelativeLayout;

import com.o2o.app.R;

public class MineUserCenterActivity extends Activity {
	/**
	 * 个人资料按钮
	 */
	private RelativeLayout rlt_userinfo;

	/**
	 * 我的二手
	 */
	private RelativeLayout rlt_old;

	/**
	 * 我的爆料
	 */
	private RelativeLayout rlt_disclose;

	/**
	 * 设置按钮
	 */
	private Button btn_pass;

	/**
	 * 我的求助
	 */
	private RelativeLayout rlt_help;

	/**
	 * 我的家庭按钮
	 */
	private RelativeLayout rlt_family;

	/**
	 * 服务管家
	 */
	private RelativeLayout rlt_steward;

	/**
	 * 消息按钮
	 */
	private RelativeLayout rlt_message;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.user_center);

		initViews();

	}

	private void initViews() {
		rlt_userinfo = (RelativeLayout) findViewById(R.id.rlt_userinfo);
		rlt_userinfo.setOnClickListener(new ClickEvent());

		rlt_old = (RelativeLayout) findViewById(R.id.rlt_old);
		rlt_old.setOnClickListener(new ClickEvent());

		rlt_disclose = (RelativeLayout) findViewById(R.id.rlt_disclose);
		rlt_disclose.setOnClickListener(new ClickEvent());

		btn_pass = (Button) findViewById(R.id.btn_pass);
		btn_pass.setOnClickListener(new ClickEvent());

		rlt_help = (RelativeLayout) findViewById(R.id.rlt_help);
		rlt_help.setOnClickListener(new ClickEvent());

		rlt_family = (RelativeLayout) findViewById(R.id.rlt_family);
		rlt_family.setOnClickListener(new ClickEvent());

		rlt_steward = (RelativeLayout) findViewById(R.id.rlt_steward);
		rlt_steward.setOnClickListener(new ClickEvent());

		rlt_message = (RelativeLayout) findViewById(R.id.rlt_message);
		rlt_message.setOnClickListener(new ClickEvent());
	}

	/**
	 * 点击事件
	 * 
	 * @author Administrator
	 * 
	 */
	class ClickEvent implements View.OnClickListener {

		@Override
		public void onClick(View v) {
			// TODO Auto-generated method stub
			switch (v.getId()) {
			case R.id.rlt_userinfo: { // 个人资料
				Intent intent = new Intent(MineUserCenterActivity.this,
						MineUserEditActivity.class);

				startActivity(intent);
			}
				break;
			case R.id.rlt_old: { // 我的二手
				Intent intent = new Intent(MineUserCenterActivity.this,
						MineOrdActivity.class);

				startActivity(intent);

			}
				break;

			case R.id.rlt_disclose: { // 我的爆料
				Intent intent = new Intent(MineUserCenterActivity.this,
						MineDiscloseActivity.class);

				startActivity(intent);
			}
				break;

			case R.id.btn_pass: { // 设置
				Intent intent = new Intent(MineUserCenterActivity.this,
						MineSettingActivity.class);

				startActivity(intent);
			}
				break;

			case R.id.rlt_help: { // 我的求助按钮
				Intent intent = new Intent(MineUserCenterActivity.this,
						MineHelpActivity.class);

				startActivity(intent);
			}
				break;
			case R.id.rlt_family: { // 我的家庭
				Intent intent = new Intent(MineUserCenterActivity.this,
						MineFamilyActivity.class);

				startActivity(intent);
			}
				break;

			case R.id.rlt_steward: { // 服务管家
				Intent intent = new Intent(MineUserCenterActivity.this,
						MineServerStewardActivity.class);

				startActivity(intent);
			}
				break;

			case R.id.rlt_message: { // 消息
				Intent intent = new Intent(MineUserCenterActivity.this,
						MineMessageActivity.class);

				startActivity(intent);

			}
				break;
			default:
				break;
			}
		}

	}

}
